package hcn.protocol.brandnew.zhenliao.yizhu;

import com.fasterxml.jackson.annotation.JsonFormat;
import ctd.util.xml.jaxb.DateAdapter;
import ctd.util.xml.jaxb.DateTimeAdapter;
import lombok.Data;

import javax.xml.bind.annotation.*;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import java.util.Date;
import java.util.List;


/**
 * 医嘱信息查询服务-响应消息（成功） - ODS_03030003_SUC
 *
 * @author enjoyLife
 */
@Data
@XmlRootElement(name = "Data")
@XmlAccessorType(XmlAccessType.FIELD)
public class ListAllAdviceResponse {

    /**
     * 患者基本信息
     */
    @XmlElement(name = "Patient")
    private Patient patient;
    /**
     * 就诊摘要
     */
    @XmlElement(name = "Visit")
    private Visit visit;
    /**
     * 住院医嘱单列表
     */
    @XmlElementWrapper(name = "Advices")
    @XmlElement(name = "Advice")
    private List<Advice> advices;

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Patient {

        /**
         * 业务系统患者档案ID
         */
        @XmlElement(name = "SourcePatientId")
        private String sourcePatientId;
        /**
         * 业务系统患者档案类型
         */
        @XmlElement(name = "SourcePatientIdType")
        private String sourcePatientIdType;
        /**
         * 建档机构代码
         */
        @XmlElement(name = "AuthorOrganization")
        private String authorOrganization;
        /**
         * 城乡居民健康档案编号
         */
        @XmlElement(name = "HealthRecordId")
        private String healthRecordId;
        /**
         * 居民健康卡号
         */
        @XmlElement(name = "HealthCardId")
        private String healthCardId;
        /**
         * 患者姓名
         */
        @XmlElement(name = "Name")
        private String name;
        /**
         * 性别代码
         */
        @XmlElement(name = "Sex")
        private String sex;
        /**
         * 出生日期
         */
        @XmlElement(name = "BirthDate")
        @XmlJavaTypeAdapter(DateAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
        private Date birthDate;
        /**
         * 身份证件号码
         */
        @XmlElement(name = "IdCard")
        private String idCard;
        /**
         * 电话号码
         */
        @XmlElement(name = "PatientPhone")
        private String patientPhone;
        /**
         * 域ID
         */
        @XmlElement(name = "DomainID")
        private String domainID;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Visit {

        /**
         * 就诊流水号
         */
        @XmlElement(name = "VisitId")
        private String visitId;
        /**
         * 就诊机构代码
         */
        @XmlElement(name = "AuthorOrganization")
        private String authorOrganization;
        /**
         * 患者类型代码
         */
        @XmlElement(name = "PatientType")
        private String patientType;
        /**
         * 住院号
         */
        @XmlElement(name = "HospizationId")
        private String hospizationId;
        /**
         * 门（急）诊号
         */
        @XmlElement(name = "ClinicId")
        private String clinicId;
        /**
         * 就诊日期时间
         */
        @XmlElement(name = "VisitDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date visitDateTime;
        /**
         * 就诊次数
         */
        @XmlElement(name = "VisitTimes")
        private Short visitTimes;
    }

    @Data
    @XmlAccessorType(XmlAccessType.FIELD)
    public static class Advice {

        /**
         * 医嘱单序号
         */
        @XmlElement(name = "AdviceId")
        private String adviceId;
        /**
         * 药品组号
         */
        @XmlElement(name = "DrugsGroupNumber")
        private String drugsGroupNumber;
        /**
         * 排列顺序
         */
        @XmlElement(name = "ArrangeOrder")
        private String arrangeOrder;
        /**
         * 处方药品组号
         */
        @XmlElement(name = "AdviceGroupId")
        private String adviceGroupId;
        /**
         * 医嘱类别代码
         */
        @XmlElement(name = "AdviceTypeCode")
        private String adviceTypeCode;
        /**
         * 医嘱开立日期时间
         */
        @XmlElement(name = "AdviceOpenDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date adviceOpenDateTime;
        /**
         * 医嘱开立者签名
         */
        @XmlElement(name = "AdviceOpenerSign")
        private String adviceOpenerSign;
        /**
         * 医嘱开立科室
         */
        @XmlElement(name = "AdviceOpenDept")
        private String adviceOpenDept;
        /**
         * 医嘱开立科室代码
         */
        @XmlElement(name = "AdviceOpenDeptCode")
        private String adviceOpenDeptCode;
        /**
         * 医嘱计划开始日期时间
         */
        @XmlElement(name = "AdvicePlanStartTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date advicePlanStartTime;
        /**
         * 医嘱计划结束日期时间
         */
        @XmlElement(name = "AdvicePlanEndTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date advicePlanEndTime;
        /**
         * 医嘱项目类型代码
         */
        @XmlElement(name = "AdviceItemType")
        private String adviceItemType;
        /**
         * 医嘱项目类型名称
         */
        @XmlElement(name = "AdviceItemTypeName")
        private String adviceItemTypeName;
        /**
         * 医嘱项目代码
         */
        @XmlElement(name = "AdviceItemCode")
        private String adviceItemCode;
        /**
         * 医嘱项目内容
         */
        @XmlElement(name = "AdviceItemName")
        private String adviceItemName;
        /**
         * 医嘱备注信息
         */
        @XmlElement(name = "AdviceNote")
        private String adviceNote;
        /**
         * 医嘱审核人签名
         */
        @XmlElement(name = "AdviceAuditSign")
        private String adviceAuditSign;
        /**
         * 审核日期时间
         */
        @XmlElement(name = "ReviewDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date reviewDateTime;
        /**
         * 核对护士签名
         */
        @XmlElement(name = "CheckNurse")
        private String checkNurse;
        /**
         * 医嘱核对日期时间
         */
        @XmlElement(name = "NurseCheckTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date nurseCheckTime;
        /**
         * 医嘱执行者签名
         */
        @XmlElement(name = "AdviceExecutorSign")
        private String adviceExecutorSign;
        /**
         * 医嘱执行日期时间
         */
        @XmlElement(name = "AdviceExecutiveDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date adviceExecutiveDateTime;
        /**
         * 医嘱执行科室代码
         */
        @XmlElement(name = "AdviceExecutiveDepartmentCode")
        private String adviceExecutiveDepartmentCode;
        /**
         * 医嘱执行状态描述
         */
        @XmlElement(name = "AdviceExecutiveStatus")
        private String adviceExecutiveStatus;
        /**
         * 医嘱停止日期时间
         */
        @XmlElement(name = "AdviceStopDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date adviceStopDateTime;
        /**
         * 停止医嘱者签名
         */
        @XmlElement(name = "StopAdviceDoctor")
        private String stopAdviceDoctor;
        /**
         * 医嘱取消日期时间
         */
        @XmlElement(name = "AdviceCancelDateTime")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date adviceCancelDateTime;
        /**
         * 取消医嘱者签名
         */
        @XmlElement(name = "AdviceCancelDoctor")
        private String adviceCancelDoctor;
        /**
         * 停嘱核对护士签名
         */
        @XmlElement(name = "StopAdviceCheckNurse")
        private String stopAdviceCheckNurse;
        /**
         * 停嘱核对日期时间
         */
        @XmlElement(name = "StopAdviceCheckDate")
        @XmlJavaTypeAdapter(DateTimeAdapter.class)
        @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        private Date stopAdviceCheckDate;
        /**
         * 医嘱项目单价
         */
        @XmlElement(name = "ItemPrice")
        private String itemPrice;
        /**
         * 一次剂量
         */
        @XmlElement(name = "OnceDosage")
        private String onceDosage;
        /**
         * 剂量单位
         */
        @XmlElement(name = "DosageUnit")
        private String dosageUnit;
        /**
         * 一次总数量
         */
        @XmlElement(name = "OnceTotalNumber")
        private String onceTotalNumber;
        /**
         * 总量单位
         */
        @XmlElement(name = "TotalNumberUnit")
        private String totalNumberUnit;
        /**
         * 药品-使用频次代码
         */
        @XmlElement(name = "UsageFrequency")
        private String usageFrequency;
        /**
         * 药品-给药途径代码
         */
        @XmlElement(name = "AdministrationRoute")
        private String administrationRoute;
        /**
         * 药品-给药途径名称
         */
        @XmlElement(name = "AdministrationRouteName")
        private String administrationRouteName;
        /**
         * 药品-用药天数
         */
        @XmlElement(name = "MedicineDays")
        private Short medicineDays;
        /**
         * 药品-执行时点
         */
        @XmlElement(name = "ExecuteTimePoint")
        private String executeTimePoint;
        /**
         * 药品-静滴滴速
         */
        @XmlElement(name = "VenaDroppingSpeed")
        private Short venaDroppingSpeed;
        /**
         * 药品-滴速单位
         */
        @XmlElement(name = "DroppingSpeedUnit")
        private String droppingSpeedUnit;
        /**
         * 皮试标志
         */
        @XmlElement(name = "SkinTestSign")
        private Boolean skinTestSign;
        /**
         * 草药煎法代码
         */
        @XmlElement(name = "HerbalMedicineDecoction")
        private Integer herbalMedicineDecoction;
        /**
         * 用药属性类别
         */
        @XmlElement(name = "MedicineProperty")
        private Integer medicineProperty;
        /**
         * 医嘱状态代码
         */
        @XmlElement(name = "AdviceStatus")
        private Integer adviceStatus;
        /**
         * 病床号
         */
        @XmlElement(name = "SickbedId")
        private String sickbedId;
        /**
         * 病房号
         */
        @XmlElement(name = "SickRoomId")
        private String sickRoomId;
        /**
         * 科室代码
         */
        @XmlElement(name = "DeptCode")
        private String deptCode;
        /**
         * 科室名称
         */
        @XmlElement(name = "DeptName")
        private String deptName;
        /**
         * 病区代码
         */
        @XmlElement(name = "WardAreaCode")
        private String wardAreaCode;
        /**
         * 病区名称
         */
        @XmlElement(name = "WardAreaName")
        private String wardAreaName;
        /**
         * 备注信息状态
         */
        @XmlElement(name = "AdviceNoteStatus")
        private String adviceNoteStatus;
        /**
         * 药品-药房规格
         */
        @XmlElement(name = "DrugstoreSpec")
        private String drugstoreSpec;
        /**
         * 药品-药房单位
         */
        @XmlElement(name = "DrugstoreUnit")
        private String drugstoreUnit;
        /**
         * 药品医保类别编码
         */
        @XmlElement(name = "DrugInsuranceCategoryCode")
        private String drugInsuranceCategoryCode;
        /**
         * 药品医保类别名称
         */
        @XmlElement(name = "DrugInsuranceCategoryName")
        private String drugInsuranceCategoryName;
        /**
         * 父医嘱ID
         */
        @XmlElement(name = "ParentAdviceId")
        private String parentAdviceId;
        /**
         * 领药量
         */
        @XmlElement(name = "ReceiveDosage")
        private Byte receiveDosage;
        /**
         * 领药量单位
         */
        @XmlElement(name = "ReceiveDosageUnit")
        private String receiveDosageUnit;
        /**
         * 处方贴数
         */
        @XmlElement(name = "PiecesChineseMedicineAgentNumb")
        private String piecesChineseMedicineAgentNumb;
        /**
         * 医嘱开立者工号
         */
        @XmlElement(name = "AdviceOpenerCode")
        private String adviceOpenerCode;
        /**
         * 医嘱开立者姓名
         */
        @XmlElement(name = "AdviceOpenerName")
        private String adviceOpenerName;
        /**
         * 医嘱审核者工号
         */
        @XmlElement(name = "AdviceAuditCode")
        private String adviceAuditCode;
        /**
         * 医嘱审核者姓名
         */
        @XmlElement(name = "AdviceAuditName")
        private String adviceAuditName;
    }

}
